package com.yc.baihe.beans;

import java.io.Serializable;

import com.yc.baihe.dao.MD5Encryption;

/**
 * 用户信息
 * @author tan
 */
public class BhUser implements Serializable{
	private static final long serialVersionUID = 1L;

	private int buid;//账号
	private String pwd;
	private String bhemail;
	private String regDate;
	private int status;
	public int getBuid() {
		return buid;
	}
	public void setBuid(int buid) {
		this.buid = buid;
	}
	public String getPwd() {
		return pwd;
	}
	public String getPwds() {
		return MD5Encryption.createPassword(pwd);
	}
	public void setPwd(String pwd) {
		this.pwd = pwd;
	}
	public String getBhemail() {
		return bhemail;
	}
	public void setBhemail(String bhemail) {
		this.bhemail = bhemail;
	}
	public String getRegDate() {
		return regDate;
	}
	public void setRegDate(String regDate) {
		this.regDate = regDate;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((bhemail == null) ? 0 : bhemail.hashCode());
		result = prime * result + buid;
		result = prime * result + ((pwd == null) ? 0 : pwd.hashCode());
		result = prime * result + ((regDate == null) ? 0 : regDate.hashCode());
		result = prime * result + status;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BhUser other = (BhUser) obj;
		if (bhemail == null) {
			if (other.bhemail != null)
				return false;
		} else if (!bhemail.equals(other.bhemail))
			return false;
		if (buid != other.buid)
			return false;
		if (pwd == null) {
			if (other.pwd != null)
				return false;
		} else if (!pwd.equals(other.pwd))
			return false;
		if (regDate == null) {
			if (other.regDate != null)
				return false;
		} else if (!regDate.equals(other.regDate))
			return false;
		if (status != other.status)
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "BhUser [buid=" + buid + ", pwd=" + pwd + ", bhemial=" + bhemail
				+ ", regDate=" + regDate + ", status=" + status + "]";
	}
	public BhUser(int buid, String pwd, String bhemial, String regDate,
			int status) {
		super();
		this.buid = buid;
		this.pwd = pwd;
		this.bhemail = bhemial;
		this.regDate = regDate;
		this.status = status;
	}
	public BhUser() {
		super();
	}
	
}